<template>
  <div id="app">
    <div id="nav" v-if="$route.path!=='/home'">
      <el-menu
        :default-active="activeIndex"
        class="el-menu-demo"
        mode="horizontal"
        @select="handleSelect"
        :router='true'
      >
        <el-menu-item index="/home" >lol官网主页 </el-menu-item>
        <el-menu-item index="/competition">英雄联盟赛事官网</el-menu-item>
        <el-menu-item index="/developer">开发者基地</el-menu-item>
        <el-menu-item index="/cloud">云顶之弈</el-menu-item>
        <el-menu-item index="/bar">网吧特权</el-menu-item>
      </el-menu>

      <div class="line"></div>
    </div>
    <router-view />
  </div>
</template>
<script>
export default {
  data () {
    return {
      activeIndex: '1',
      activeIndex2: '1'
    }
  },
  methods: {
    handleSelect (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>
<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  background: #2c3e50;
  height: 3600px;
}

#nav {
  padding: 30px;
}

#nav a.router-link-exact-active {
  color: #42b983;

}
</style>
